package com.john.Enum;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * 封装返回结果code和message
 * 日期 2021/5/27 14:54
 * 创建者：john driver
 */
@Getter
@ToString
@AllArgsConstructor
public enum ResultEnum {
    SUCCESS(200,"success"),
    ERROR(500,"服务端错误"),
    //自定义异常错误
    CUSTOM_EXCEPTION_ERROR(500100,"自定义异常错误"),
    //请求参数
    REQUEST_PARAM_ERROR(500200,"请求参数不合法"),
    BIND_ERROR(500201,"参数校验异常"),
    //未知错误
    UNKNOWN_ERROR(600100,"未知错误")
    ;
    private final Integer code;
    private final String message;

}
